<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Captcha extends My_Controller {

    public function index() {
        $this->load->library('captchamb');
        $code = $this->input->get('captcha');
//        if ($code)
//            $this->captchamb->setCode($code);
//        else
        $this->captchamb->setCode(substr(sha1(mt_rand()), 17, 6));
        $this->session->set_userdata('captcha_mobile', $this->captchamb->getCode());
        $this->captchamb->showImage();
    }

}

?>
